FROM nginx:1.23.4-alpine-slim

ENV SERVER_PROXY_PASS="http://localhost:8999/api/backend"
ENV TZ=Asia/Shanghai

COPY ./dist /usr/share/nginx/html

COPY ./nginx/nginx.conf.template /etc/nginx/nginx.conf.template

COPY ./docker-entrypoint.sh /

RUN  chmod 777 /docker-entrypoint.sh

ENTRYPOINT ["/docker-entrypoint.sh"]

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]